<extend name="Base/base"/>
<block name="title">{$title}</block>
<block name="content">
    <div class="main-title">
        <h2>编辑后台菜单</h2>
    </div>
    <form action="{:U()}" method="post" class="form-horizontal">
        <div class="form-item">
            <label class="item-label">标题<span class="check-tips">（用于后台显示的配置标题）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="name" value="{$info.name|default=''}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">排序<span class="check-tips">（用于分组显示的顺序）</span></label>
            <div class="controls">
                <input type="text" class="text input-small" name="sort" value="{$info.sort|default=0}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">链接<span class="check-tips">（U函数解析的URL或者外链）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="url" value="{$info.url|default=''}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">上级菜单<span class="check-tips">（所属的上级菜单）</span></label>
            <div class="controls">

                <select name="pid">
                    <option value="0">顶级目录</option>
                    <foreach name="menus" item="menu">
                        <option value="{$menu.id}" <if condition="$menu['id'] eq $info['pid']">selected</if>>{$menu.name}</option>
                    </foreach>
                </select>
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">分组<span class="check-tips">（用于左侧分组二级菜单）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="group" value="{$info.group|default=''}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">是否隐藏<span class="check-tips"></span></label>
            <div class="controls">
                <label class="radio"><input type="radio" name="hide" value="1"  <if condition="$info['hide'] eq 1">checked</if>>是</label>
                <label class="radio"><input type="radio" name="hide" value="0"  <if condition="$info['hide'] eq 0">checked</if>>否</label>
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">仅开发者模式可见<span class="check-tips"></span></label>
            <div class="controls">
                <label class="radio"><input type="radio" name="is_dev" value="1"  <if condition="$info['is_dev'] eq 1">checked</if>>是</label>
                <label class="radio"><input type="radio" name="is_dev" value="0"  <if condition="$info['is_dev'] eq 0">checked</if>>否</label>
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">是否激活<span class="check-tips"></span></label>
            <div class="controls">
                <label class="radio"><input type="radio" name="is_active" value="0" <if condition="$info['is_active'] eq 0">checked</if>>是</label>
                <label class="radio"><input type="radio" name="is_active" value="1" <if condition="$info['is_active'] eq 1">checked</if>>否</label>
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">说明<span class="check-tips">（菜单详细说明）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="tip" value="{$info.tip|default=''}">
            </div>
        </div>
        <div class="form-item">
            <input type="hidden" name="id" value="{$info.id|default=''}">
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);
                    return false;">返 回</button>
        </div>
    </form>
</block>

<block name="script">
    <script type="text/javascript">
                //导航高亮
                highlight_subnav('{:U('index')}');
    </script>
</block>